
classdef SimpleSequentialPlotReportOutputImpl < cdmapc.IReportOutput
    
    methods (Access = public)
        
        %
        % Destructor
        %
        function [] = delete(~)
            
        end % function
        
        function [] = show(~, xVector, yVector)
            if(nargin == 1)
                error('Debe proporcionarse el eje de abscisas');
            elseif(nargin == 2)
                error('Debe proporcionarse el eje de ordenadas');
            end % if
            innerXVector = xVector.vector;
            innerYVector = yVector.vector;
            lengthX = length(innerXVector);
            if(lengthX ~= length(innerYVector))
                error('La longitud de los vectores no coincide');
            end % if
            startingPoint = floor(lengthX / 20);
            for(point = startingPoint : lengthX) %#ok
                plot(innerXVector(1 : point), innerYVector(1 : point)); %#ok
                refreshdata;
                drawnow;
                pause(.3);
            end % for
            xVector.reset();
            yVector.reset();
        end % function
        
    end % methods
    
end % function
